<template>
  <div class="w markdown">
    <textarea v-model="markdown_content" rows="8" class="markdown_content"></textarea>
    <markdown-it-vue class="md-body"
                     :content="markdown_content"
                     :options="options"
    />
<!--    <button @click="markdown_click()">显示</button>-->
  </div>
</template>

<script>
import MarkdownItVue from 'markdown-it-vue'
import 'markdown-it-vue/dist/markdown-it-vue.css'
export default {
  components: {
    MarkdownItVue
  },
  data() {
    return {
      html:"",
      options: {
        markdownIt: {
          linkify: true
        }
      },
      markdown_content: ''
    }
  },
  methods: {
    markdown_click: function(){
      console.log(this.markdown_content)
    }
  }
}
</script>


<style scoped>
@import "../../common/stylus/style.css";
@import "../../assets/css/all.css";
@import "../../assets/css/code_page.css";
</style>